#ifndef __OS_LIB_H__
#define __OS_LIB_H__


#include "os_types.h"
#include <rtthread.h>

extern BOOL os_tick_out(UINT32 start, UINT32 ms);
extern UINT8 os_lib_xor_check(UINT8 *p,UINT16 n);
extern UINT8 os_lib_xor_param(UINT8 xor, UINT8 *p, UINT16 n);
extern UINT16 crc16_ccitt(UINT8 *s, UINT16 len);
extern char *strcopy( char *p, const char *str);
extern char *findstr( const char *str1, char *s);
extern INT16 findnstr(char *strin, char *strfind, UINT16 index);
extern UINT16 findstrcnt(char *strin, char *strfind);
extern UINT32 cutintstr(char *p, UINT32 n0, const char *endstr, char *s);
extern UINT32 cutstrstr(char *p, const char *startstr, const char *endstr, char *s);
extern UINT32 cutstrend(char *p, const char *startstr, UINT32 retn, char *s);
extern char *cutintlen(char *p, UINT32 n0, UINT32 len, char *s);
extern char *insertstr(char *p, UINT32 n0, const char *str, char *s);

extern UINT32 strto_hextab(UINT8 *p, char *s);
extern UINT32 strto_hex(const char *startstr, const char *endstr, UINT8 *s);
extern char *hexto_str(char *p, UINT8 *s, char *str2, UINT16 n);
extern BOOL u32_to_hex(UINT8 *p, UINT8 len, UINT32 dat);
extern char *skipspaceathead(char *p);
extern UINT16 ascii_to_unicode(uint8_t *p, uint16_t plen, uint8_t *s, uint16_t slen);

#endif


